Core.Test.Events = {

	/**
	 * Handles summary output on test suite finish.
	 * @param data - Y.Test.Runner.COMPLETE_EVENT event
	 */
	suiteFinish: function(event) {
		var title, stats, results = event.results;
		
		title = "Completed '" + results.name + "'";
		stats = "Passed: " + results.passed + " Failed: " + results.failed + " Ignored: " + results.ignored + " Total: " + results.total;
		
		Env.log(title + "\n" + stats, (results.failed === 0 ? "success" : "failure"), "TestRunner");
		
		if(results.failed === 0) { console.log(title + "\n" + stats); }
		else { console.error(title + "\n" + stats);}
	},
	
	/**
	 * Clears environment after each test.
	 */
	testFinish: function() {
		debug = false;
		
		T.Mock.restoreAll();
		Core.Test.Logger.deactivate();
	}
};